﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DSP_Seed_Viewer
{
    public partial class Form1 : Form
    {
        public Dictionary<string, int> galaxyDict = new Dictionary<string, int>
        {
            { "M型恒星", 0 },{ "K型恒星", 0 },{ "G型恒星", 0 },{ "F型恒星", 0 },{ "A型恒星", 0 },{ "B型恒星", 0 },{ "O型恒星", 0 },
            { "红巨星", 0 },{ "黄巨星", 0 },{ "白巨星", 0 },{ "蓝巨星", 0 },
            { "白矮星", 0},{ "中子星", 0 },{ "黑洞", 0 },
            { "巨星总数", 0 },{ "最多卫星数", 0 },{ "最多潮汐星", 0 },{ "潮汐星球数", 0 },
            { "沙漠星球数", 0},{ "熔岩星球数", 0 },{ "冰冻星球数", 0 },{ "海洋星球数", 0 },{ "气态星球数", 0 },{ "总星球数量", 0 },
            { "星球总亮度", 0 }
        };

        public Dictionary<string, int> planetDict = new Dictionary<string, int>
        {
            { "地中海", 0 },{ "水世界", 0 },{ "樱林海", 0 },{ "红石", 0 },{ "海洋丛林", 0 },{ "草原", 0 }, { "热带草原", 0 }, {"潘多拉沼泽", 0 },
            { "火山灰", 0 },
            { "猩红冰湖", 0 },{ "熔岩", 0 },
            { "戈壁", 0 },{ "干旱荒漠", 0 },{ "贫瘠荒漠", 0 },{ "黑石盐滩", 0 },{ "飓风石林", 0 }, { "橙晶荒漠", 0 },
            { "灰烬冻土", 0 },{ "冰原冻土", 0 }, { "极寒冻土", 0 },
            { "冰巨星", 0 },{ "气态巨星", 0 }
        };

        public Dictionary<string, int> resourceDict = new Dictionary<string, int>
        {
            { "铁矿脉", 0 },{ "铜矿脉", 0 },{ "硅矿脉", 0 },{ "钛矿脉", 0 },{ "石矿脉", 0 },{ "煤矿脉", 0 },
            { "原油涌泉", 0 },{ "可燃冰矿", 0 },{ "金伯利矿", 0 },{ "分形硅矿", 0 },{ "有机晶体矿", 0 },{ "光栅石矿", 0 },{ "刺笋矿脉", 0 },
            { "单极磁矿", 0 }
        };

        private static Dictionary<string, string> planetTypeDict = new Dictionary<string, string>
        {
            { "Desert", "沙漠星球数" },
            { "Vocano", "熔岩星球数" },
            { "Ice", "冰冻星球数" },
            { "Ocean", "海洋星球数" },
            { "Gas", "气态星球数" }
        };

        public static List<string> dataGridViewTitleList = new List<string>{
            "星系名称","星系类型", "星球数量", "环盖首星", "星系距离", "恒星光度", "潮汐星数", "最多卫星", "星球类型", "星球类名", "个人备注",
            "是否有水", "有硫酸否", "铁矿脉", "铜矿脉", "硅矿脉", "钛矿脉", "石矿脉", "煤矿脉","原油涌泉",
            "可燃冰矿","金伯利矿","分形硅矿","有机晶体","光栅石矿","刺笋矿脉","单极磁矿"
        };

        private int seedNumber = 10000000;
        private int starNumber = 64;
        private List<Label> galaxiesCountLabelList = new List<Label>();
        private List<Label> planetsCountLabelList = new List<Label>();
        private List<Label> resourcesCountLabelList = new List<Label>();

        string GetStarTypeString(StarData star)
        {
            string typeString = "";
            if (star.type == EStarType.GiantStar)
                typeString = star.spectr > ESpectrType.K ? (star.spectr > ESpectrType.F ? (star.spectr != ESpectrType.A ? typeString + "蓝巨星" : typeString + "白巨星") : typeString + "黄巨星") : typeString + "红巨星";
            else if (star.type == EStarType.WhiteDwarf)
                typeString += "白矮星";
            else if (star.type == EStarType.NeutronStar)
                typeString += "中子星";
            else if (star.type == EStarType.BlackHole)
                typeString += "黑洞";
            else if (star.type == EStarType.MainSeqStar)
                typeString = typeString + star.spectr + "型恒星";
            return typeString;
        }

        string GetPlanetSingularityString(PlanetData planetData)
        {
            string singularityString = "";
            if (planetData.orbitAround > 0)
                singularityString += "卫星";
            if ((planetData.singularity & EPlanetSingularity.TidalLocked) != EPlanetSingularity.None)
                singularityString += "潮汐锁定永昼永夜";
            if ((planetData.singularity & EPlanetSingularity.TidalLocked2) != EPlanetSingularity.None)
                singularityString += "潮汐锁定1:2";
            if ((planetData.singularity & EPlanetSingularity.TidalLocked4) != EPlanetSingularity.None)
                singularityString += "潮汐锁定1:4";
            if ((planetData.singularity & EPlanetSingularity.LaySide) != EPlanetSingularity.None)
                singularityString += "横躺自转";
            if ((planetData.singularity & EPlanetSingularity.ClockwiseRotate) != EPlanetSingularity.None)
                singularityString += "反向自转";
            if ((planetData.singularity & EPlanetSingularity.MultipleSatellites) != EPlanetSingularity.None)
                singularityString += "多卫星";
            return singularityString;
        }

        void countTotalResource(int idx, int amount)
        {

            switch (idx)
            {
                case 0: resourceDict["铁矿脉"] += amount; break;
                case 1: resourceDict["铜矿脉"] += amount; break;
                case 2: resourceDict["硅矿脉"] += amount; break;
                case 3: resourceDict["钛矿脉"] += amount; break;
                case 4: resourceDict["石矿脉"] += amount; break;
                case 5: resourceDict["煤矿脉"] += amount; break;
                case 6: resourceDict["原油涌泉"] += amount; break;
                case 7: resourceDict["可燃冰矿"] += amount; break;
                case 8: resourceDict["金伯利矿"] += amount; break;
                case 9: resourceDict["分形硅矿"] += amount; break;
                case 10: resourceDict["有机晶体矿"] += amount; break;
                case 11: resourceDict["光栅石矿"] += amount; break;
                case 12: resourceDict["刺笋矿脉"] += amount; break;
                case 13: resourceDict["单极磁矿"] += amount; break;

                default: break;
            }
        }

        string GetPlanetTypeString(PlanetData planetData)
        {
            string typeString = "未知";
            ThemeProto themeProto = LDB.themes.Select(planetData.theme);
            if (themeProto != null)
                typeString = themeProto.DisplayName;
            return typeString;
        }

        int GetMagData(StarData star)
        {
            int result = 0;

            for (int j = 0; j < star.planets.Length; j++)
            {
                var planet = star.planets[j];
                var ResourceCounts = PlanetModelingManager.RefreshPlanetData(planet);

                if (ResourceCounts != null)
                {
                    result += ResourceCounts[14];
                }
                else
                {
                    MessageBox.Show("Loading resource error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    break;
                }
            }
            return result;
        }

        public Form1()
        {
            InitializeComponent();

            seedNumTextBox.Text = seedNumber.ToString();
            starNumTextBox.Text = starNumber.ToString();

            create_total_stats_labels();

            create_data_table();

            PlanetModelingManager.Start();
        }

        private void create_total_stats_labels()
        {
            int i = 0;
            foreach (var pair in galaxyDict)
            {
                Label label = new Label();
                label.Name = "galaxyStatsLabel" + (i + 1).ToString();
                label.Size = new Size(75, 25);
                label.Text = pair.Key + ":";
                label.Location = new Point(20, 60 + i * 25);
                this.Controls.Add(label);

                Label displayLabel = new Label();
                displayLabel.Name = "totalGalaxyLabelResult" + (i + 1).ToString();
                displayLabel.Text = Convert.ToString(pair.Value);
                displayLabel.Size = new Size(30, 25);
                displayLabel.Location = new Point(100, 60 + i * 25);
                galaxiesCountLabelList.Add(displayLabel);
                this.Controls.Add(displayLabel);

                i++;
            }

            int j = 0;
            foreach (var pair in planetDict)
            {
                Label label = new Label();
                label.Name = "planetStatsLabel" + (j + 1).ToString();
                label.Size = new Size(75, 25);
                label.Text = pair.Key + ":";
                label.Location = new Point(130, 60 + j * 25);
                this.Controls.Add(label);

                Label displayLabel = new Label();
                displayLabel.Name = "totalPlanetStatsLabelResult" + (j + 1).ToString();
                displayLabel.Text = Convert.ToString(pair.Value); ;
                displayLabel.Size = new Size(30, 25);
                displayLabel.Location = new Point(210, 60 + j * 25);
                planetsCountLabelList.Add(displayLabel);
                this.Controls.Add(displayLabel);

                j++;
            }

            int k = 0;
            foreach (var pair in resourceDict)
            {
                Label label = new Label();
                label.Name = "resourceStatsLabel" + (k + 1).ToString();
                label.Size = new Size(75, 25);
                label.Text = pair.Key + ":";
                label.Location = new Point(240, 60 + k * 25);
                this.Controls.Add(label);

                Label displayLabel = new Label();
                displayLabel.Name = "resourceStatsLabelResult" + (k + 1).ToString();
                displayLabel.Text = Convert.ToString(pair.Value); ;
                displayLabel.Size = new Size(30, 25);
                displayLabel.Location = new Point(320, 60 + k * 25);
                resourcesCountLabelList.Add(displayLabel);
                this.Controls.Add(displayLabel);

                k++;
            }
        }

        //重载_SortCompare方法
        private void dataGridView1_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
        {
            //   如果是恒星光度或星系距离列，则按浮点数处理
            if (e.Column.HeaderText == "恒星光度" || e.Column.HeaderText == "星系距离")
            {
                e.SortResult = (Convert.ToDouble(e.CellValue1) - Convert.ToDouble(e.CellValue2) > 0) ? 1 : -1;
            }
            else if (e.Column.HeaderText == "铁矿脉" || e.Column.HeaderText == "铜矿脉" || e.Column.HeaderText == "硅矿脉" ||
                    e.Column.HeaderText == "钛矿脉" || e.Column.HeaderText == "石矿脉" || e.Column.HeaderText == "煤矿脉" ||
                    e.Column.HeaderText == "原油涌泉" || e.Column.HeaderText == "可燃冰矿" || e.Column.HeaderText == "金伯利矿" ||
                    e.Column.HeaderText == "分形硅矿" || e.Column.HeaderText == "有机晶体矿" || e.Column.HeaderText == "光栅石矿" ||
                    e.Column.HeaderText == "刺笋矿脉" || e.Column.HeaderText == "单极磁矿")
            {
                e.SortResult = (Convert.ToDouble(e.CellValue1) - Convert.ToDouble(e.CellValue2) > 0) ? 1 : -1;
            }
            //否则，按字符串比较
            else
            {
                e.SortResult = String.Compare(Convert.ToString(e.CellValue1), Convert.ToString(e.CellValue2));
            }
            e.Handled = true;
        }

        private void create_data_table()
        {
            //根据Header和所有单元格的内容自动调整行的高度
            //dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            dataGridView1.ReadOnly = true;

            //定义SortCompare消息处理方法
            dataGridView1.SortCompare += new DataGridViewSortCompareEventHandler(dataGridView1_SortCompare);

            dataGridView1.Width = 4000;

            //添加列
            int sizeNum = 27;

            for (int i = 0; i < sizeNum; i++)
            {
                dataGridView1.Columns.Add(new DataGridViewTextBoxColumn());
                dataGridView1.Columns[i].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                //dataGridView1.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;  //设置所有列自适应宽度
            }

            //列的标题

            for (int i = 0; i < dataGridViewTitleList.Count; i++)
            {
                dataGridView1.Columns[i].HeaderText = dataGridViewTitleList[i];
            }

            dataGridView1.ReadOnly = false;
            for (int i = 0; i < sizeNum; i++) dataGridView1.Columns[i].ReadOnly = true;
            dataGridView1.Columns[10].ReadOnly = false;

            dataGridView1.Columns[0].MinimumWidth = 90;
            dataGridView1.Columns[1].MinimumWidth = 60;
            dataGridView1.Columns[2].MinimumWidth = 20;
            dataGridView1.Columns[3].MinimumWidth = 30;
            dataGridView1.Columns[4].MinimumWidth = 60;
            dataGridView1.Columns[5].MinimumWidth = 60;
            dataGridView1.Columns[6].MinimumWidth = 20;
            dataGridView1.Columns[7].MinimumWidth = 20;
            dataGridView1.Columns[8].MinimumWidth = 300;
            dataGridView1.Columns[9].MinimumWidth = 300;

            dataGridView1.Columns[8].SortMode = DataGridViewColumnSortMode.NotSortable;
            dataGridView1.Columns[9].SortMode = DataGridViewColumnSortMode.NotSortable;

            dataGridView1.Columns[10].MinimumWidth = 80;
            dataGridView1.Columns[10].SortMode = DataGridViewColumnSortMode.NotSortable;

            dataGridView1.Columns[11].MinimumWidth = 30;
            dataGridView1.Columns[12].MinimumWidth = 30;

            for (int j = 13; j < 27; j++) dataGridView1.Columns[j].MinimumWidth = 30;

            //设置对齐方式和字体
            dataGridView1.RowsDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dataGridView1.Font = new Font("宋体", 10);
            dataGridView1.AllowUserToResizeColumns = true;
            dataGridView1.AllowUserToResizeRows = true;
            //dataGridView1.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.EnableResizing;

        }

        private void reset_stats_data()
        {
            List<string> keyList = new List<string>();
            foreach (var pair in galaxyDict) keyList.Add(pair.Key);
            foreach (var key in keyList) galaxyDict[key] = 0;

            keyList = new List<string>();
            foreach (var pair in planetDict) keyList.Add(pair.Key);
            foreach (var key in keyList) planetDict[key] = 0;

            keyList = new List<string>();
            foreach (var pair in resourceDict) keyList.Add(pair.Key);
            foreach (var key in keyList) resourceDict[key] = 0;

            int index = dataGridView1.Rows.Add();
            for (int i = 0; i <= index; i++)
            {
                dataGridView1.Rows.RemoveAt(0);
            }
        }

        private void getSeedData(int seedNum, int starCount)
        {
            reset_stats_data();
            exportCSV.Enabled = true;

            GameDesc gd = new GameDesc();
            gd.SetForNewGame(UniverseGen.algoVersion, seedNum, starCount, 1, 1);
            GalaxyData galaxyData = UniverseGen.CreateGalaxy(gd);
            if (galaxyData == null)
                return;

            try
            {
                //string outputStr = "";

                List<List<string>> galaxiesList = new List<List<string>>();

                float maxLumino = 0.0f;
                float totalLumino = 0.0f;
                for (int i = 0; i < galaxyData.stars.Length; i++)
                {
                    var star = galaxyData.stars[i];
                    string currentStarString = GetStarTypeString(star);
                    galaxyDict[currentStarString] += 1;

                    if (star.dysonLumino > maxLumino) maxLumino = star.dysonLumino;

                    totalLumino += star.dysonLumino;

                    float distance = (float)(star.uPosition - galaxyData.stars[0].uPosition).magnitude / 2400000.0f;
                    int starPositionX = (int)Math.Round(star.uPosition.x, 0, MidpointRounding.AwayFromZero);
                    int starPositionY = (int)Math.Round(star.uPosition.y, 0, MidpointRounding.AwayFromZero);
                    int starPositionZ = (int)Math.Round(star.uPosition.z, 0, MidpointRounding.AwayFromZero);

                    bool isInDsp = star.dysonRadius * 2 > star.planets[0].sunDistance;
                    // bool isInDsp2 = star.planets.Length >= 2 && star.dysonRadius * 2 > star.planets[1].sunDistance;

                    /*
                    int cxsdcount = 0;
                    int[] resource = new int[LDB.veins.Length];
                    var planetCount1 = 0;
                    float gasSpeed = 0;
                    string planetNameInfo = "";
                    */

                    List<string> galaxyList = new List<string>();

                    string planetsType = "";
                    string planetsString = "";
                    int moons = 0;
                    int maxMoons = 0;
                    int tidals = 0;
                    bool hasWater = false;
                    bool hasAcid = false;

                    List<int> resourceCountList = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

                    for (int j = 0; j < star.planets.Length; j++)
                    {
                        var planet = star.planets[j];
                        string currentPlanetString = GetPlanetTypeString(planet);

                        planetDict[currentPlanetString] += 1;

                        if (planet.waterItemId == 1000)
                            hasWater = true;
                        if (planet.waterItemId == 1116)
                            hasAcid = true;

                        string singularityString = "";
                        if (planet.orbitAround > 0)
                            singularityString += "卫星";
                        if ((planet.singularity & EPlanetSingularity.TidalLocked) != EPlanetSingularity.None)
                            singularityString += "潮汐锁定永昼永夜";
                        if ((planet.singularity & EPlanetSingularity.MultipleSatellites) != EPlanetSingularity.None)
                            singularityString += "多卫星";

                        if (singularityString.Contains("潮汐锁定永昼永夜"))
                        {
                            galaxyDict["潮汐星球数"] += 1;
                            planetsString += "=";
                            planetsType += "=";
                            tidals += 1;
                        }
                        planetsString += currentPlanetString;
                        planetsType += planet.type;
                        if (planet.type.ToString() == "Gas") moons = 0;

                        if (singularityString.Contains("多卫星"))
                        {
                            planetsString += "@@";
                            planetsType += "@@";
                        }
                        else if (singularityString.Contains("卫星"))
                        {
                            planetsString += "@";
                            planetsType += "@";
                            moons += 1;
                            if (moons > maxMoons) maxMoons = moons;
                        }


                        if (j < star.planets.Length - 1) planetsString += "|";
                        if (j < star.planets.Length - 1) planetsType += "|";

                        galaxyDict[planetTypeDict[planet.type.ToString()]] += 1;

                        var counts = PlanetModelingManager.RefreshPlanetData(planet);
                        if (counts != null)
                        {
                            for (int k = 0; k < LDB.veins.Length; k++)
                            {
                                resourceCountList[k] += counts[k + 1];
                            }
                        }
                    }

                    if (tidals > galaxyDict["最多潮汐星"]) galaxyDict["最多潮汐星"] = tidals;
                    if (maxMoons > galaxyDict["最多卫星数"]) galaxyDict["最多卫星数"] = maxMoons;

                    galaxyDict["总星球数量"] += star.planetCount;

                    galaxyList.Add(star.name);
                    galaxyList.Add(currentStarString);
                    galaxyList.Add(star.planetCount.ToString());
                    galaxyList.Add(isInDsp ? "是" : "否");
                    galaxyList.Add(distance.ToString("F3"));
                    galaxyList.Add(star.dysonLumino.ToString("F4"));
                    galaxyList.Add(tidals.ToString());
                    galaxyList.Add(maxMoons.ToString());
                    galaxyList.Add(planetsType);
                    galaxyList.Add(planetsString);
                    galaxyList.Add("");
                    galaxyList.Add(hasWater ? "是" : "否");
                    galaxyList.Add(hasAcid ? "是" : "否");

                    for (int k = 0; k < resourceCountList.Count; k++)
                    {
                        countTotalResource(k, resourceCountList[k]);
                        galaxyList.Add(resourceCountList[k].ToString());
                    }

                    galaxiesList.Add(galaxyList);
                }

                galaxyDict["巨星总数"] = galaxyDict["红巨星"] + galaxyDict["黄巨星"] + galaxyDict["白巨星"] + galaxyDict["蓝巨星"];

                int labelCount = 0;
                foreach (var pair in planetDict)
                {
                    planetsCountLabelList[labelCount++].Text = pair.Value.ToString();
                }

                labelCount = 0;
                foreach (var pair in galaxyDict)
                {
                    galaxiesCountLabelList[labelCount++].Text = pair.Value.ToString();
                }
                galaxiesCountLabelList[labelCount-1].Text = totalLumino.ToString("F1");  // 星球总亮度

                labelCount = 0;
                foreach (var pair in resourceDict)
                {
                    resourcesCountLabelList[labelCount++].Text = pair.Value.ToString();
                }

                foreach (var galaxy in galaxiesList)
                {
                    int index = dataGridView1.Rows.Add();
                    for (int i = 0; i < galaxy.Count; i++)
                    {
                        dataGridView1.Rows[index].Cells[i].Value = galaxy[i];
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "catch", MessageBoxButtons.OK);
                Console.WriteLine("Error occurred");
                Console.WriteLine(ex);
            }
        }

        private void readSeedButton_Click(object sender, EventArgs e)
        {
            try
            {
                seedNumber = int.Parse(seedNumTextBox.Text);
                if (seedNumber < 0 || seedNumber >= 100000000)
                {
                    MessageBox.Show("种子数必须大于零和小于一亿", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("种子数必须大于零和小于一亿", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            try
            {
                starNumber = int.Parse(starNumTextBox.Text);
                if (starNumber < 32 || starNumber > 64)
                {
                    MessageBox.Show("星球数必须在32和64之间", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("星球数必须在32和64之间", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            getSeedData(seedNumber, starNumber);
        }

        private void exportCSV_Click(object sender, EventArgs e)
        {
            string rowString = "";
            for (int i = 0; i < dataGridViewTitleList.Count; i++)
            {
                if (dataGridViewTitleList[i] != "个人备注") rowString += "" + dataGridViewTitleList[i] + ", ";
            }
            rowString += "个人备注" + "\n";

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                string comment = "";
                for (int i = 0; i < dataGridViewTitleList.Count; i++)
                {
                    if (dataGridViewTitleList[i] != "个人备注") rowString += "" + row.Cells[i].Value + ", ";
                    else comment = "" + row.Cells[i].Value;
                }
                rowString += comment + "\n";
            }

            string currentPath = System.Environment.CurrentDirectory;
            currentPath += "\\" + seedNumber + "-" + starNumber + ".csv";
            File.WriteAllText(currentPath, rowString, Encoding.UTF8);

            MessageBox.Show("已输出文件到" + currentPath);
        }

        private void seedNumTextBox_TextChanged(object sender, EventArgs e)
        {
            /*
            string checkDigit = "0123456789";
            string inputText = seedNumTextBox.Text;
            string newStr = "";
            if (inputText.Length > 0)
            {
                foreach (var digit in inputText)
                {
                    if (checkDigit.IndexOf(digit) != -1)
                    {
                        newStr += digit;
                    }
                }
                seedNumTextBox.Text = newStr;
                //seedNumber = int.Parse(newStr);
            }
            */
        }

        private void starNumTextBox_TextChanged(object sender, EventArgs e)
        {
            /*
            string checkDigit = "0123456789";
            string inputText = starNumTextBox.Text;
            string newStr = "";
            if (inputText.Length > 0)
            {
                foreach (var digit in inputText)
                {
                    if (checkDigit.IndexOf(digit) != -1)
                    {
                        newStr += digit;
                    }
                }
                starNumTextBox.Text = newStr;
                //starNumber = int.Parse(newStr);
            }
            */
        }

        //readonly string ConstSingleTitle = "星系名字,星区数量,亮度,行星,距离,星系类型,是否环内行星,星球类型,最大重氢速率,卫星总数,潮汐锁定,是否有水,是否有硫酸,铁矿脉,铜矿脉,硅矿脉,钛矿脉,石矿脉,煤矿脉,原油涌泉,可燃冰矿,金伯利矿,分形硅矿,有机晶体矿,光栅石矿,刺笋矿脉,单极磁矿\n";
        //private string CommonTitle = "种子ID,星区数量,磁石总数,蓝巨星总数,0型恒星总数,星系数据1,星系数据2,星系数据3,星系数据4,星系数据5,星系数据6,星系数据7,星系数据8,星系数据9,星系数据10,星系数据11\n";

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
